package com.oig.sys.workflow.dao;

import com.oig.sys.workflow.entity.TbAutoExeLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author wuxl
 */
public interface ITbAutoExeLogDao extends JpaRepository<TbAutoExeLog, Integer>, JpaSpecificationExecutor<TbAutoExeLog> {

	/**
	 * 一定要有索引
	 */
	@Modifying
	@Query("delete from TbAutoExeLog l where l.ruleId=:ruleId")
	void deleteByRuleId(@Param("ruleId") Integer ruleId);
}
